#
# Author: Lott Caskey <lottcaskey@gmail.com>
# License: GPLv3
#

.PHONY: all install

PIDGIN_CFLAGS=`/usr/bin/pkg-config --cflags pidgin`
PIDGIN_LIBS=`/usr/bin/pkg-config --libs pidgin`
PIDGIN_PLUGINDIR=`pkg-config --variable=plugindir pidgin`

all: paintboard.so

paintboard.so: paintboard.c
	gcc -fPIC -shared $(PIDGIN_CFLAGS) $(PIDGIN_LIBS) -o paintboard.so paintboard.c -Wall

clean:
	rm -rf paintboard.so

install:
	install -d -m 755 $(DESTDIR)$(PIDGIN_PLUGINDIR)
	install -p -m 755 paintboard.so $(DESTDIR)$(PIDGIN_PLUGINDIR)
